package com.rcd.manager.dao.impl;

import java.util.List;

import com.rcd.dao.INewsDao;
import com.rcd.exception.MyException;
import com.rcd.manager.dao.INewsManagerDao;
import com.rcd.util.Page;
import com.rcd.vo.News;

public class INewsManagerDaoimpl implements INewsManagerDao {

	private INewsDao newsDao;
	public void setNewsDao(INewsDao newsDao) {
		this.newsDao = newsDao;
	}

	public void addNews(News news) throws MyException {
		newsDao.addNews(news);
	}

	public void delNews(int nid) throws MyException {
		newsDao.delNews(nid);
	}

	public List<News> findAll(Page page) throws MyException {
		return newsDao.findAll(page);
	}

	public News findById(int nid) throws MyException {
		return newsDao.findById(nid);
	}

	public int getCount(Page page) throws MyException {
		return newsDao.getCount(page);
	}

	public void updateNews(News news) throws MyException {
		newsDao.updateNews(news);
	}

	public void delNewss(Object[] nids) throws MyException {
		newsDao.delNewss(nids);
	}

}
